﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Smartec.Accounts.Camel.AMS.Model.Facades;
using Smartec.Accounts.Camel.AMS.Model.Entities;
using System.Web.Security;


public static class AuthorizationManager
{
    public static bool Authorize(string controllerName, string actionName)
    {
        return HttpContext.Current.User.Identity.IsAuthenticated && RoleControllerFacade.AuthorizeAction(controllerName, actionName, System.Web.Security.Roles.GetRolesForUser(HttpContext.Current.User.Identity.Name));
    }

  }
